/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.hera.process.workflow.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.hera.base.domain.BaseDomain;

/**
 *
 * @author cmontes
 */
@Entity
@Table(name = "PROC_INSTANC_NOTE")
public class ProcInstancNote  extends BaseDomain implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @Column(name = "ID_PROC_INSTANC_NOTE")
    private Long idProcInstancNote;
    private String comments;
    @Column(name = "ID_USER")
    private Long idUser;
    private Integer secuence;
    @Column(name = "ID_TYPE")
    private Long idType;
    @JoinColumn(name = "ID_PROCESS_INSTANCE", referencedColumnName = "ID_PROCESS_INSTANCE")
    @ManyToOne
    private ProcessInstance processInstance;

    public ProcInstancNote() {
    }

    public ProcInstancNote(Long idProcInstancNote) {
        this.idProcInstancNote = idProcInstancNote;
    }

    public Long getIdProcInstancNote() {
        return idProcInstancNote;
    }

    public void setIdProcInstancNote(Long idProcInstancNote) {
        this.idProcInstancNote = idProcInstancNote;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public Long getIdUser() {
        return idUser;
    }

    public void setIdUser(Long idUser) {
        this.idUser = idUser;
    }

    public Integer getSecuence() {
        return secuence;
    }

    public void setSecuence(Integer secuence) {
        this.secuence = secuence;
    }

    public Long getIdType() {
        return idType;
    }

    public void setIdType(Long idType) {
        this.idType = idType;
    }

    public ProcessInstance getProcessInstance() {
        return processInstance;
    }

    public void setProcessInstance(ProcessInstance processInstance) {
        this.processInstance = processInstance;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idProcInstancNote != null ? idProcInstancNote.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        
        if (!(object instanceof ProcInstancNote)) {
            return false;
        }
        ProcInstancNote other = (ProcInstancNote) object;
        if ((this.idProcInstancNote == null && other.idProcInstancNote != null) || (this.idProcInstancNote != null && !this.idProcInstancNote.equals(other.idProcInstancNote))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.hera.process.data.domain2.ProcInstancNote[ idProcInstancNote=" + idProcInstancNote + " ]";
    }
    
}
